package com.example.good.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.good.entity.ClassDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ClassMapper extends BaseMapper<ClassDO> {
    
    @Select("select * from class where id =  #{classId}")
    ClassDO getClassById(Long classId);
    
    @Select("select id from class where class_name = #{className}")
    Long getClassByName(String className);
}
